{% include 'front/header.html' %}
<br />
<div id="page">
    <div style="padding: 20px; background-color: #F2F2F2;">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">指数分析</div>
                    <div class="layui-card-body">
                        <img src='http://image2.sinajs.cn/newchart/min/n/sh000001.gif?'>
                        <img src='http://image2.sinajs.cn/newchart/daily/n/sh000001.gif?'>
                        <img src='http://image2.sinajs.cn/newchart/monthly/n/sh000001.gif?'>
                    </div>
                </div>
            </div>
            <div class="layui-col-md6">
                <div class="layui-card">
                    <div class="layui-card-header" style="background:#23b78747;">热点板块:</div>
                    <div class="layui-card-body">
                        <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
                        <div id="main" style="height:400px"></div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-header" style="background:#23b78747;">大盘分析</div>
                    <div class="layui-card-body">
                        大盘分析
                    </div>
                </div>
            </div>
             <div class="layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-header" style="background:#23b78747;">大盘分析</div>
                    <div class="layui-card-body">
                        大盘分析
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- ECharts单文件引入 -->
<script type="text/javascript">
    //基于准备好的DOM，初始化ECharts图表
    var myChart = echarts.init(document.getElementById("main"));
    //指定图表的配置项和数据
    function getLevelOption() {
        return [
            {
                itemStyle: {
                    borderWidth: 0,
                    gapWidth: 5
                }
            },
            {
                itemStyle: {
                    gapWidth: 1
                }
            },
            {
                colorSaturation: [0.35, 0.5],
                itemStyle: {
                    gapWidth: 1,
                    borderColorSaturation: 0.6
                }
            }
        ];
    }
    var option = {   //指定图表的配置项和数据
        title: {  //配置标题组件
            text: '板块分析', top: 15,
            textStyle: { color: 'green' }, left: 270
        },
        series: [{
            name: '全部',
            type: 'treemap',
            roam: false,
            nodeClick: false,
            visibleMin: 0,
            levels: getLevelOption(),
            data: {{ content["data"] | safe  }}
        }]
    };
    myChart.setOption(option);
</script>
</body>
</html>